<?php

namespace app\api\validate\pes\freight;

use think\Validate;

class PriceValidate extends Validate
{
    /**
     * 验证规则
     */
    protected $rule
        = [
            'origin_id'              => 'require|number|min:1',
            'destination_id'         => 'require|number|min:1',
            'transportation_type_id' => 'require|number|min:1',
        ];
    /**
     * 提示消息
     */
    protected $message
        = [
        ];
    /**
     * 验证场景
     */
    protected $scene
        = [
            'search'  => ['origin_id', 'destination_id', 'transportation_type_id']
        ];

    public function __construct(array $rules = [], $message = [], $field = [])
    {
        $this->field = [
            'origin_id'              => __('Origin_id'),
            'destination_id'         => __('Destination_id'),
            'transportation_type_id' => __('Transportation_type_id'),
        ];
        parent::__construct($rules, $message, $field);
    }

}
